using Microsoft.EntityFrameworkCore;
using Demo.Models;

namespace Demo.Db
{
    public class DemoDb : DbContext
    {
        private readonly string _constr="server=.;database=Demo;uid=sa;pwd=123456;";

        protected override void OnConfiguring(DbContextOptionsBuilder builder)
        {
            builder.UseSqlServer(_constr);
        }


        public DbSet<Category> Categorys { get; set; }
        public DbSet<Product> Products { get; set; }
    }
}